package com.zc.im.seqsvr.domain;

import com.zc.im.common.r2dbc.domain.AbstractBase;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.springframework.data.relational.core.mapping.Table;

/**
 * Project：im
 * Date：2022/4/13
 * Time：18:20
 * Description：seq记录
 *
 * @author Challen.Zhang
 * @version 1.0
 */
@Getter
@Setter
@Table("im_user_seq")
@NoArgsConstructor
public class UserSeq extends AbstractBase {

    private Long currentSeq;

    public UserSeq(Builder builder) {
        super(builder);
        this.currentSeq = builder.currentSeq;
    }

    public static class Builder extends AbstractBase.Builder<Builder> {

        private Long currentSeq;


        public Builder currentSeq(Long currentSeq) {
            this.currentSeq = currentSeq;
            return this;
        }


        @Override
        protected Builder self() {
            return this;
        }

        @Override
        public UserSeq build() {
            return new UserSeq(this);
        }
    }
}
